home *** CD-ROM | disk | FTP | other *** search
- (*
- DAT_TIM5.DOC
- September 10, 1989
-
- A Turbo Pascal Unit (TPU) for Turbo Pascal 5.0
- (Updated from the 11/11/88 TP 4.0 version)
-
- Denam Systems
- 1115 Madison St. N.E. Suite 226
- Salem, Oregon 97303
-
- (503) 363-0198
- CompuServe 70405, 1422
-
- Programmer: Dennis R. Fischer
-
- Copyright 1988-89, Denam Systems
- FREEWARE - For noncommercial use only
-
-
-
- { Returns system time/date - NO expected input. System
- date/time MUST be set correctly prior to using }
- procedure GetDateStr (var DateStr : string); { 10/28/88 }
- procedure GetDate4Str (var DateStr : string); { 10/28/1988 }
- procedure GetFullDateStr (var DateStr : string); { October 28, 1988 }
- procedure GetTimeStr (var TimeStr : string); { 1:12 AM }
- procedure GetTime24Str (var Time24Str : string); { 0112 }
-
-
- { Date string expects either xx/xx/xx or xx/xx/xxxx format. }
- function ExtractMonth (Date : string) : word;
- function ExtractDay (Date : string) : word;
- function ExtractYear (Date : string) : word;
-
-
- { Time string MUST be 24 hour format }
- function ExtractHour (Time : string) : word;
- function ExtractMinute (Time : string) : word;
-
-
- procedure ConvAMPMTo24 (var Time : string);
- { Converts AM/PM time string to 24 hour string }
-
-
- procedure Conv24ToAMPM (var Time : string);
- { Converts 24 hour string to AM/PM string }
-
-
- function IsLeap (Year : word) : boolean;
- { Returns TRUE if year is Leap Year }
-
-
- function DaysSince0 (Date : string) : longint;
- { Returns the total number of days since January 1, 0000 AD
- Expected input is xx/xx/xxxx Minimum beginning date
- is January 1, 0001 }
-
-
- function GetElaspeTime (var TimeStr : string; var TimeVal : longint;
- SDate, EDate, STime, ETime : string) : boolean;
-
- { Expects a date format of xx/xx/xxxx - If a date format of
- xx/xx/xx is used, date will default to the 20th century (xx/xx/19xx)
-
- SDate = Starting date
- EDate = Ending date
- STime = Starting time (24 hour format)
- ETime = Ending time (24 hour format)
-
- TimeStr returned = i.e. 2:36 (2 hours & 36 minutes)
- TimeVal returned = total minutes
-
- Function returns TRUE if valid date & times were entered else
- function returns FALSE and TimeStr contains error message }
-
- *)